import request from '@/utils/request'

// 查询小程序码列表
export function listProgram(query) {
  return request({
    url: '/recycle/program/list',
    method: 'get',
    params: query
  })
}

// 查询小程序码详细
export function getProgram(id) {
  return request({
    url: '/recycle/program/' + id,
    method: 'get'
  })
}

// 新增小程序码
export function addProgram(data) {
  return request({
    url: '/recycle/program',
    method: 'post',
    data: data
  })
}

// 修改小程序码
export function updateProgram(data) {
  return request({
    url: '/recycle/program',
    method: 'put',
    data: data
  })
}

// 删除小程序码
export function delProgram(id) {
  return request({
    url: '/recycle/program/' + id,
    method: 'delete'
  })
}
